package com.version.manager.controller.wx;

import com.version.manager.controller.BaseController;
import com.version.manager.entity.Shop.shopGoods;
import com.version.manager.model.Msg;
import com.version.manager.service.Shop.shopGoodsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(value = "shopCategoryController")
@RequestMapping("/shop/goods")
public class WxGoodsController  extends BaseController<shopGoodsService, shopGoods> {
    @Autowired
    private  shopGoodsService service;
    @RequestMapping(value = "banner",method = RequestMethod.GET)
    @ResponseBody
    public Msg banner(String categoryId){
        return service.getBanner(categoryId);
    }

    @RequestMapping(value = "detail",method = RequestMethod.GET)
    @ResponseBody
    public Msg goods(String id){
        return service.getGoods(id);
    }
}
